{% import 'Dockerfile/docker.jinja2'    as docker %}
{% import 'Dockerfile/provision.jinja2' as provision %}
{% import 'Dockerfile/services.jinja2'  as services %}

{% macro alpine(role='') -%}
    # Install development environment
    && apk-install \
        # Install tools
        graphviz \
        # Install php development stuff
        php7-xdebug \
    {{ services.phpDev() }}
{%- endmacro %}


{% macro centos(role='') -%}
# Install development environment
    && wget -O - "https://packages.blackfire.io/fedora/blackfire.repo" | tee /etc/yum.repos.d/blackfire.repo \
    && yum-install \
        # Install tools
        graphviz \
        # Install php development stuff
        php7-xdebug \
        blackfire-php \
        blackfire-agent \
        # Tools
        nano \
        vim \
    {{ services.phpDev() }}
{%- endmacro %}

{% macro webtatic(role='') -%}
    && wget -O - "https://packages.blackfire.io/fedora/blackfire.repo" | tee /etc/yum.repos.d/blackfire.repo \
    && yum-install \
        # Install tools
        graphviz \
        # Install php development stuff
        php70w-pecl-xdebug \
        blackfire-php \
        blackfire-agent \
        # Tools
        nano \
        vim \
    {{ services.phpDev() }}
{%- endmacro %}

{% macro debian(role='') -%}
    # Install development environment
        && apt-install \
        gnupg \
    && wget -q -O - https://packages.blackfire.io/gpg.key | apt-key add - \
    && echo "deb https://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \
    && apt-install \
        # Install tools
        graphviz \
        # Install php development stuff
        php-xdebug \
        blackfire-php \
        blackfire-agent \
        # Tools
        nano \
        vim \
    {{ services.phpDev() }}
{%- endmacro %}

{% macro debianSury(role='') -%}
    # Install development environment
    && apt-install \
        gnupg \
    && wget -q -O - https://packages.blackfire.io/gpg.key | apt-key add - \
    && echo "deb https://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \
    && apt-install \
        # Install tools
        graphviz \
        # Install php development stuff
        php7.0-xdebug \
        blackfire-php \
        blackfire-agent \
        # Tools
        nano \
        vim \
    {{ services.phpDev() }}
{%- endmacro %}

{% macro ubuntu(role='') -%}
    # Install development environment
    && apt-install \
        gnupg \
    && wget -q -O - https://packages.blackfire.io/gpg.key | apt-key add - \
    && echo "deb https://packages.blackfire.io/debian any main" | tee /etc/apt/sources.list.d/blackfire.list \
    && apt-install \
        # Install tools
        graphviz \
        # Install php development stuff
        php-xdebug \
        blackfire-php \
        blackfire-agent \
        # Tools
        nano \
        vim \
    {{ services.phpDev() }}
{%- endmacro %}
